<!-- Icon.vue -->
<template>
  <svg
    :style="{ width, height }"
    xmlns="http://www.w3.org/2000/svg"
    viewBox="0 0 1024 1024"
    class="icon-svg"
  >
    <use :xlink:href="prefix + name" :fill="color"></use>
  </svg>
</template>

<script setup lang="ts">
defineProps({
  prefix: {
    type: String,
    default: '#icon-'
  },
  name: String,
  color: {
    type: String,
    default: ''
  },
  width: {
    type: String,
    default: '32px'
  },
  height: {
    type: String,
    default: '32px'
  }
})
</script>

<style scoped>
.icon-svg {
  display: block;
}
</style>
